package com.mls.fivedistrict.controller.portal;

import com.mls.fivedistrict.common.ServiceResponse;
import com.mls.fivedistrict.controller.BaseController;
import com.mls.fivedistrict.pojo.GUser;
import com.mls.fivedistrict.server.GUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by chenxiuxiang on 2018/5/7.
 */
@RestController
@RequestMapping("/api/app")
public class GUserController extends BaseController {

    @Autowired
    GUserService gUserService;

    @GetMapping(path = "/v1/gUser")
    public ServiceResponse getGUserDetail() {
        GUser gUserDetail = gUserService.getGUserDetail(getUser().getId());
        return ServiceResponse.createSuccessResponse(gUserDetail);

    }
}
